﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    class car
    {
        
        public string brand { get; set; }
        public string era { get; set; }
        public car(string brand,string era)
        {
            this.brand = brand;
            this.era = era;
        }

    }

    class BMW : car, Irun, Ispeed
    {
        public BMW(string brand, string era) : base(brand, era) { }

        public void run()
        {
            Console.WriteLine("一辆{0}代的{1}在奔跑", this.era, this.brand);
        }

        public void speed()
        {
            Console.WriteLine("一辆{0}代的{1}在加速", this.era, this.brand);
        }
    }

    class batcar : car, Ifly, Ieruption
    {
        public batcar(string brand, string era) : base(brand, era) { }

        public void fly()
        {
            Console.WriteLine("一辆{0}代的{1}在飞行",this.era,this.brand);
        }

        public void reuption()
        {
            Console.WriteLine("一辆{0}代的{1}在喷火", this.era, this.brand);
        }
    }

    interface Irun
    {
        void run();
    }
    interface Ispeed
    {
        void speed();
    }
    interface Ifly
    {
        void fly();
    }
    interface Ieruption
    {
        void reuption();
    }

}
